// 导入自定义组件
import VueRouter from "vue-router";
import Login from "../views/Login.vue"
import Main from "../components/main.vue"
import Welcome from "../components/Welcome.vue"
import Client from "../components/client/clientManagement.vue"
import Employee from "../components/employee/Employee.vue"

const Users = () => import("../components/users/Users.vue")
const CheckGoods = () => import('../components/goods/CheckGoods')
const GoodsInfo = () => import('../components/goods/GoodsInfo')
const GoodsInfoImg = () => import('../components/goods/GoodsInfoImg')

// 定义路由数组
export default new VueRouter({
	routes: [
		{
			path: "/",
			redirect: "/login"
		},
		{
			path: '/login',
			component: Login
		},
		{
			path: "/main",
			component: Main,
			redirect: "/welcome",
			children: [
				{
					path: '/welcome',
					component: Welcome
				},
				{
					path: '/client',
					component: Client
				},
				{
					path: '/employee',
					component: Employee
				},
				{
					// 个人信息模块
					path: '/users',
					component: Users
				},
				{
					path: '/checkgoods',
					component: CheckGoods
				},
				{
					path: '/goodsinfo',
					component: GoodsInfo
				}
				,
				{
					path: '/goodsinfoimg',
					component: GoodsInfoImg
				}
			]
		},
	]
});




